//
//  NewsStoryViewController.m
//  theRamblerApp_tab
//
//  Created by Nadia Smith on 11/3/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "NewsStoryViewController.h"


@implementation NewsStoryViewController

@synthesize delegate;

@synthesize storyText, headline, storyImage;//, post;


- (void)dismissView:(id)sender {
	
    // Call the delegate to dismiss the modal view
    [delegate didDismissModalView];
}

/*- (void)nextView:(id)sender 
 {
 
 nextStoryViewController.delegate = self;
 
 nextStoryViewController.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;	
 
 // Create a Navigation controller
 UINavigationController *navController = [[UINavigationController alloc]
 initWithRootViewController:nextStoryViewController];
 
 // show the navigation controller modally
 [self presentModalViewController:navController animated:YES];
 
 // Clean up resources
 [navController release];
 }*/

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
 if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
 // Custom initialization
 }
 return self;
 }
 */


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
	[super viewDidLoad];
	
	
	// Uncomment the following line to preserve selection between presentations.
	// self.clearsSelectionOnViewWillAppear = NO;
	//storyText.text=@"Hummawhadda?";
	/*self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc]
	 initWithTitle:@"Frontpage"style:UIBarButtonItemStylePlain
	 target:self
	 action:@selector(dismissView:)] autorelease];*/
	self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
											   initWithTitle:@"Frontpage"style:UIBarButtonItemStylePlain
											   target:self
											   action:@selector(dismissView:)] autorelease];
	// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
	// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}



- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Overriden to allow any orientation.
    return YES;
}


- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}


- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
	[storyText release];
	[headline release]; 
	[storyImage release];
	//[post release];
    [super dealloc];
}



@end